import React from "react";
import { tablBarPropsTypes } from "./type"
import Search, { SearchProps } from "antd/es/input/Search";
import Style from "./index.module.scss"
const TablBar: React.FC<tablBarPropsTypes> = (props) => {

    const onSearch: SearchProps['onSearch'] = (value: string) => {
        props.changeValue(value)
    }
    return (
        <div className={Style.tablBar + " flex"}>
            <div className={Style.tablBar_left}><Search placeholder="请输入你想搜索的内容" onSearch={onSearch} enterButton /></div>
            {props.rightConter ? <div className={Style.tablBar_right + " flex-end"}>{props.rightConter()}</div> : ""}
        </div>
    )
}
export default TablBar